Design of highly nonlinear confusion component based on entangled points of quantum spin states

Cryptosystems are commonly deployed to secure data transmission over an insecure line of communication. To provide confusion in the data over insecure networks, substitution boxes are the solitary components for delivering a nonlinear mapping between inputs and outputs. A confusion component of a block cipher with high nonlinearity and low differential and linear approximation probabilities is considered secure against cryptanalysis. This study aims to design a highly nonlinear substitution-permutation network using the blotch symmetry of quantum spin states on the Galois field GF (28). To observe the efficiency of the proposed methodology, some common and advanced measures were evaluated for performance, randomness, and cryptanalytics. The outcomes of these analyses validate that the generated nonlinear confusion components are effective for block ciphers and attain better cryptographic strength with a high signal-to-noise ratio in comparison to state-of-the-art techniques.

Related work. Numerous structures exist to generate the outcomes for S-boxes with either traditional or modern chaos-based algorithms 37,38 , and many researchers have applied optimization methods, such as evolutionary algorithms [39][40][41] , to improve the chaos-based consequences for the confusion component. Although these methodologies to design the structures of S-boxes offer favorable characteristics, researchers have also pointed out the weaknesses of these approaches 42 . Many statistical attacks are available for the assembly of S-box designs, including linear and differential [43][44][45] , interpolation 46 , Grobner basis 47 , side-channel 48 , SAT solver 49 , XL 50 , and XSL 51 attacks. Chaos-based systems have been used extensively in the construction of confusion components 52,53 , but owing to the inherent algorithmic advancement of control parameters and periodicity in the maps, several weaknesses of these systems also exist in the literature, including discontinuity and non-uniform distribution in chaotic sequences 54,55 , predictability 56,57 , finite precision effect and short quantity of randomness 58,59 , dynamical degradation of chaotic systems and frail chaos 60,61 , and a small number of control parameters 62,63 .
The authors in 64 generated the outcomes by transforming the binary Gray code into a standard AES S-box. Likewise, the authors in 65 offered two boxes for AES, and the authors in 66 minimized the computational complexity of AES by modifying the affine transformation matrices. A few recent studies for designing dynamic S-boxes using cellular automata (CA) are highlighted in [67][68][69] with comparable cryptographic properties. However, these practices do not provide substantial attributes because of the insignificant differential probability values 70 .
Among the computational prototypes established in the quantum era, quantum walks 71,72 , quantum spin states 73,74 , and quantum chaos 75,76 have been employed to develop modern algorithms. The generated confusion components using these procedures still need improvements to compete with standard algorithms, such as AES, in the sense of nonlinearity and balancedness. Although, the physical hardware for quantum computing is not yet available, the inspired frameworks provide platforms for emulating pseudo-quantum algorithms, which can perform various quantum mechanical solicitations endorsed by the influence of quantum computations within the constraints executed by the capability of classical machines 77 . Contribution. Inspired by the tremendous nonlinear features of quantum algorithms, the constraints of classical cryptosystems can be enhanced by designing state-of-the-art projections for effective applications in information security [78][79][80][81] . The main contribution of this research is to explore the assimilation of quantuminspired algorithms into conventional cryptographic applications. To accentuate the highly nonlinear balanced S-boxes (8,8) described by the property of having an exceptionally high resistance to linear and differential cryptanalysis, we developed a bit-level quantum dot protocol on the blotch symmetry of quantum spin states to generate the true random sequence. We also designed and used a white-box to map multiple bits within a single state into a singular bit to balance the output of each state. It also resists the reverse engineering process to cope with brute-force attacks performed either in classical or quantum machines.
The confrontation of linear and differential cryptanalysis for the evaluated nonlinear components is superior to some common boxes used in AES, APA 82 , Gray 64 , PICARO 21 , NSA's Skipjack 83 , and state-of-the-art block ciphers. The maximum nonlinearity achieved using the Rijndael structure for AES is 112 and 94 in PICARO, whereas our method generates S-boxes with a nonlinearity of 114.
To estimate the efficiency of the projected model, we compared the numerical evaluation of confusion components with well-established criteria of some state-of-the-art mechanisms, such as nonlinearity, balancedness and bijectivity, linear and differential approximation probabilities (LP and DP), strict avalanche and bit independence criteria (SAC and BIC), NIST statistical suite, and cryptanalytic analyses. The results of the proposed methodology validate that the generated S-boxes are feasible for multifaceted solicitations in information security.

Methodology
Collection of Boolean functions F(X n ) = f 1 (X n ), ..., f m (X n ) through mapping of F : F n 2 a F m 2 over the Galois field GF p m 84 to generate confusion component using the blotch symmetry of quantum states is evaluated in this section. The details of Boolean Functions, Galois Field, and the Substitution box are provided in the supplementary information underneath the heading preliminaries. This section provides a brief overview of the mechanism used to construct the confusion components, such as the evaluation of quantum dots from states, the development of balanced Boolean function values, the pseudo algorithm, and the structural flowchart. www.nature.com/scientificreports/ Evaluation of Quantum dots. The unitary group of degree n ' SU(n) ' is defined as a set of n × n special matrices with entries from complex numbers having determinant one. It can be signified as: where z 1 , z 2 ∈ C , and |z 1 | 2 + |z 2 | 2 = 1.
We consider S z as the most general form of the 2 × 2 matrix as: Therefore, the spin 1 /2 system can be engraved as: p q r s 1 0 = + 2 1 0 , and p q r s The generated solutions to the above equivalences are: p = + 2 , q = 0, r = 0, and s = − 2 .
The corresponding outcomes for the above solution are: Therefore, the spin operators in the x, y and z directions with eigenvalues of ± /2 are evaluated as.
The constituent of the spin system in a direction along the unit vector n is n =î sin θ cos φ +ĵ sin θ sin φ +k cos θ.
Therefore, the spin vector S can be transformed into a new unit vector S n = S ·n , hence, S n = S x sin θ cos φ + S y sin θ sin φ + S z cos θ , or more generally, S n = 2 cos θ sin θ e −iφ sin θe −iφ − cos θ , and the eigenvectors are |+ � n = cos θ 2 |+ � + sin θ 2 e iφ |− � and |− � n = sin θ 2 |+ � − cos θ 2 e iφ |− �. Let us entangle the produced 2 × 2 matrices from S n in the x, y and z directions by introducing the identity matrix to generate a set S of 4 × 4 entangled matrices, that is, S = {S k ∈ S 4×4 (I, S x , S y , S z ), k = 1, 2, ..., 24 .} . The points at which the entangled states reflect their symmetry are referred to as quantum dots 85 , as shown in Fig. 1. Fig. 2 is mapped to a single bit using white-box (WB) with multiple operations that map F 4 2 to F 2 , as demonstrated in Fig. 3, to evaluate the binary sequence(s) to generate S-boxes. The total number of functions in the white-box that correspond to input bits will be 2 2 n , implying that there will be 256 Boolean functions in the white-box for four input values.

Generation of balanced Boolean function values. The generation of four bits in each state in
If the produced 8-bit sequence is similar to the previous state(s) sequence or unable to satisfy the balance criterion, the produced sequence from the same states will again operate with the WB until the condition is fulfilled. The random assortment of each operation in the WB to produce a single bit also resists the reverse engineering threats to cryptographic structures.
Algorithm. The detailed algorithm to design highly nonlinear confusion component(s) is explained as follows: • To initialize the setup, we first set the phase domain between − 720° and 720° with a sufficient step size i . A larger phase domain with a smaller step size leads to unbounded or measureless states generation. • Each state contains multiple points to produce binary data, where the points in each state(s) will be at different positions and have distinct classifications among other states to produce truly random data. • The algorithm of Table 1 takes statistics from the first eight states and produces an 8-bit sequence using the WB. There will be a mapping of multiple points within a state to generate a single bit using WB. • For 256 operations with multiple of eight states, the statistics are fetched from 2048 states. If any of the 8-bit outputs using WB are similar to any previous record, the operation will be repeated in the same states until a unique sequence is generated. • The algorithm then substantiates the balancedness property of the unique sequence. It repeats the same constraints if the condition is not fulfilled. • It generates the S-box after validating the desired nonlinearity, SAC, and linear and differential probability approximations. It will take a designated phase shift in the input domain and perform all the operations again if any of the trials are not satisfied.
Structural flowchart. The protuberant structure used to construct the highly nonlinear balanced S-boxes for block ciphers is shown in Fig. 4. There is no prerequisite of Add-Round-Key to alter or modify the keys or www.nature.com/scientificreports/ phase information for different rounds in a block cipher. If there is a small phase domain to design the states for quantum dots, then after producing sufficient outcomes for the S-boxes, the states are shifted to 45° and dots are generated at different positions in each state and perform the desired operations.  www.nature.com/scientificreports/ S-box conditions: If there is a dispute between bits' repetition(s) or the balancedness is not satisfied, the algorithm repeats itself on the same constraints. It will not move to the next state unless the conditions are fulfilled. The S-box is assembled after scrutinizing the conditions of the desired nonlinearity and strict avalanche quality criteria.

Experimental results
The generated substitution boxes are listed in Tables 2 and 3 after satisfying certain criteria, such as the 0/1 balance test, bits alteration to reach the nearby affine function, sensitivity of avalanche deviations by a single variation in the network's input, minute alteration in the input sequence to observe the variation in the output, and determination of the maximum disparity of the event's outcome by witnessing the imbalance between the input and output bits 86 . The supplementary information contains a comprehensive description of these analyses underneath the evaluation criteria for s-boxes. The outcomes based on the proposed methodology, as well as their assessments with standard structures and state-of-the-art implications, are discussed in the following subsections. Generated S-boxes. We evaluated multiple balanced Boolean functions, and the outcomes of the two nonlinear components for block ciphers are demonstrated in Tables 2 and 3.
The S-boxes represent a distinct group of n variable Boolean functions. Therefore, we carried out the following measures to assess the performance of the intended nonlinear components. We validated the randomness in the bit stream generated with blotch symmetry of entangled states over the 2-D plane using the NIST statistical test suite (800-22) 87 . This suite entails multiple assessments, provided in the supplementary information, to investigate the security of the anticipated design. We conducted cryptanalytic analysis, including algebraic degree, absolute indicator, algebraic immunity, correlation immunity, propagation criteria to ensure the diffusion characteristics in Boolean functions, differential uniformity, differential cryptanalysis, differential power analysis in terms of signal-to-noise ratio, and transparency order to quantify the resistance of the s-boxes against differential attacks.
Nonlinearity comparison. Linear mapping of input vectors to the output renders the cryptosystem breakable. A higher nonlinearity of the confusion component is always desirable to make the cryptosystem strong enough to provide resistance against linear and differential attacks. The nonlinearity of all Boolean function constituents for the evaluated S-boxes S 1 and S 2 and their comparison with various methodologies are given in Table 4.
The maximum non-linearity for 8-bit balanced Boolean functions achievable with standard AES, APA, or Gray S-box is 112. The confusion components, either with this nonlinearity or nearby, are generally considered to be secure. We reached nonlinearity of 114 for 8-bit balanced Boolean functions with the proposed methodology, which validates superior capacity to state-of-the-art findings in resisting attacks.  www.nature.com/scientificreports/ SAC and BIC comparison. A cryptographic hash function or block cipher must launch the avalanche effect to a substantial degree for reliable randomization to protect the algorithm from the cryptanalyst breaking partially or entirely by predicting the input at a given output. It is satisfied when each of the output bits flips with a 50% probability by complimenting a single input bit. The pairwise independence between avalanche variables for a specified set of avalanche vectors is evaluated here with the BIC assessment given in Table 5. By analyzing the outcomes reported in Table 5, the proposed approach produces better outcomes than stateof-the-art attainments. The maximum BIC-NL value obtained in existing methods is 112, however we reached 114 in our trial. The findings of the aforementioned method also satisfy the SAC analysis, yielding a near-optimal value of 0.5.

NIST statistical analyses.
To investigate the security of the proposed design, we executed the NIST statistical test suite (800-22) on the generated random sequence by quantum dots for S-boxes. The outcomes of this trial are presented in Table 6.
Based on the findings in Table 6, we discovered that the produced sequence for mono-bits and block frequency assessments meet the intimacy of the ones fraction to about one-half, which exhibited that the number of ones and zeros in a sequence and in m-bit block(s) are approximately the same. To observe the fluctuations between the substrings, run and longest run assessments were performed, whilst the rank of disjoint sub-matrices for the www.nature.com/scientificreports/ entire sequence is assessed to determine the linear dependency. We evaluated the FFT to detect periodic features in the sequence to identify the divergence from the notion of randomness. Runs of zeros were not analyzed individually for periodic and a-periodic assessments because of concerns about statistical impartiality. Using a feedback register, we conducted a universal statistical test and a linear-complexity test to determine the number of bits between matching patterns and the complexity of the sequence. We also observed the frequency of each overlapping pattern in the sequence using a serial test and used approximate entropy assessment to relate the frequency of overlapping blocks to the expected outcomes for the random sequence. We evaluated the cumulative sum to determine the maximum excursion of the random walk and validated the randomness in sequence based on the findings shown in Table 6.
Balancedness, Bijectivity, LP, and DP comparison. A function with significant disparity can easily be approximated by a constant function, and an S-box is considered balanced if all of its Boolean function constituents are balanced. To analyze the imbalance between the input and output bits and determine the maximum www.nature.com/scientificreports/   www.nature.com/scientificreports/ disparity estimation of the event's outcome, we evaluated its linear probability. The S-boxes are considered secure against linear cryptanalysis if they have a small linear probability. For the variation in output for a minute alteration in the input sequence, we computed the differential probability. The immunity of the S-box to differential cryptanalysis is better if the maximum value of DP is as small as possible. Table 7 comprises analyses of balancedness, bijectivity, number of fixed points, LP, and DP for the assessed S-boxes using the proposed methodology, as well as comparisons with AES, APA, Gray, and state-of-the-art practices. All Boolean functions involved in the structure of the anticipated methodology to generate the confusion components satisfy the balance criteria, that is, W f (0) = 0 . The XOR operation among Boolean functions satisfies the bijection property. The proposed algorithm generates nonlinear components that meet the highest possible valuation for DP of 4/256. Furthermore, the evaluated LP values of the intended and AES, APA, and Gray boxes are equivalent or superior to the state-of-the-art schemes shown in Table 7.
Cryptanalytic analyses comparison. We executed numerous cryptanalytic analyses to measure the resistivity against diverse attacks. The reasoning for these findings are discussed in the supplementary data. Table 8 summarizes the findings of each investigation and their comparison with the available approaches.
By investigating the outcomes in Table 8, the propagation criteria fulfill the assurity of diffusion properties in Boolean functions. The algebraic degree is sufficiently high to resist cryptanalytic attacks and is comparable with state-of-the-art results. Using the consequences of Tables 2, 3, we executed correlation attacks and found perfect  www.nature.com/scientificreports/ correlation immunity. In our proposed model, the largest δ uniformity value is as low as in AES and APA structures, and the estimation of differential cryptanalytics for the assessed S-boxes is close to one. The estimated SNR and transparency order for the generated boxes were sufficiently high to provide resistivity against DPA attacks.

Discussion
We demonstrated the integration of quantum states with the classical system for real-time environments by witnessing a point on which the quantum state reflects its symmetry, referred to as a quantum dot, rather than observing a superposition state on quantum machine into a definite state on classical system. We employ a conventional white-box, which has no impact on the quantumness features, to balance the functions. The produced sequence using proposed method for mono-bits and block frequency satisfies the intimacy of the ones fraction to almost one-half while ensuring the diffusion features in Boolean functions. A multivalued cryptographic Boolean function employing a recurrent neural network was recently developed 91 . The network generates balanced confusion components with low linear and differential probability and a nonlinearity of 112. They train the net using rigorous limitations of activation function and the initialization of Mackey-Glass time series on the specified parameters, such as the time series' behavior becomes chaotic if τ grows from 17. In the experiment, 3000 learning samples over a specified period were analyzed to balance the parameters by mapping the intermission to itself. Each cycle yields a unique byte, resulting in 256 value vectors. If the generated S-box is not balanced, the system will repeat itself with new learning samples. Their method is ineffective for real-time applications due to space and execution constraints. Furthermore, they did not fulfill the avalanche and NIST criteria and did not undertake cryptanalytic investigations to validate the algorithm's efficacy against specific attacks, rendering it vulnerable to certain threats.
Similarly, with recent advances in quantum computations, the author proposed quantum spinning operators to develop confusion components 74 with properties similar to traditional benchmarks, such as nonlinearity, BIC, Table 7. Evaluation of balancedness, bijectivity, LP, and DP for generated S-boxes and comparison with benchmark approaches.  www.nature.com/scientificreports/ SAC, and several others. Although the author employed quantum attributes to initiate the true random sequence, and the statistics are favorable, the approach is based on a random walk with Brownian motion. To overcome the challenge of superposition states into definite, as shown in Fig. 1d, e, the author launched a random walk with states on a classical system. The method focuses on random walk rather than true randomization characteristics to balance the confusion component of block cipher. These methodologies produce better outcomes for confusion components, however, their integration with traditional systems in real-time environments is impractical because of the initial execution period and computational complexities. The developed model is simple and produces true random sequences, overcomes the aforementioned challenges, and produces superior outcomes than existing frameworks. It also has a higher resistance to hostile cryptographic attacks. The functions assessed in Tables 2, 3 are substantially compact without information loss and complex enough to be considered random. We observed from Tables 4, 5, 6, 7 that these functions maintain high resistivity in terms of linear cryptanalysis by: • Maintaining the magnitude of the function's discrepancy lower and satisfying the 0/1 balance test, • Satisfying the pairwise independence of the avalanche variables for a given set of avalanche vectors by complimenting a single plain bit, and • Providing the least possible Hamming distance to the reference function from the set of all variable affine functions.
These functions validate the resistivity against differential and side-channel attacks while maintaining the diffusion characteristics. By witnessing the results in Table 8, the evaluated functions provide: • Differential uniformity with small DP and δ value, • Sufficiently high signal-to-noise ratio, and • Immunity to correlation and algebraic attacks.
In comparison to recent neural network architectures and available quantum-assisted classical computation schemes for SPN network design, the proposed framework is easy to develop and deploy with favorable cryptographic characteristics, and has a high potential to resist statistical and differential attacks.

Conclusion and future works
The security strength of block ciphers greatly relies on the confusion components to resist differential and linear attacks, and the threat of cryptanalysis using quantum classification by performing the reverse computation or executing brute force is one of the core issues of this decade. The produced design provides insights into quantum dots evolved from spin states to generate a truly random sequence for the confusion components, with high nonlinearity and low linear and differential probabilities, to overcome the quantum threats to block ciphers. To evaluate the efficiency of the proposed methodology, we compared the consequences of the intended S-boxes, based on widely accepted cryptographic and cryptanalytic measures, with benchmarks and state-of-the-art outcomes. The exhaustive contrast of these analyses showed that the algorithm is free of algebraic weakness with outstanding performance and provides robustness against linear and differential attacks.
We strongly believe that there is room for further improvements to envisioned structures with even better cryptographic properties. This model is designed for classical machines and can be used to modify the AES structure. The notions of the developed structure can be extended into a qubit model to protect the block ciphers against quantum computation threats. Reckonings of quantum dots in Bloch symmetry are possible when classical bits can be mapped into a qubit or in the form of quantum state(s).